package com.jiang.spring_security_singleboot.service.impl;

import com.jiang.spring_security_singleboot.domain.SysRole;
import com.jiang.spring_security_singleboot.mapper.RoleMapper;
import com.jiang.spring_security_singleboot.service.IRoleService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @中软华腾软件系统有限公司,未经授权不得擅自传播
 * @类描述:
 * @类名称:RoleServiceImpl
 * @作者: 蒋正午
 * @编辑时间: 2021/4/26 23:45
 * @版本: 1.0
 */
@Service
public class RoleServiceImpl  implements IRoleService {

    @Resource
    private RoleMapper roleMapper;

    @Override
    public List<SysRole> findRolesByUid(int uid) {
        return roleMapper.findRoleByUid(uid);
    }

    @Override
    public void save(SysRole role) {
        roleMapper.save(role);
    }

    @Override
    public List<SysRole> findAll() {
        return roleMapper.findAll();
    }
}
